import packageJson from '../../../package.json'

/**
 * 应用信息配置
 * 统一管理应用的基本信息，避免重复导入 package.json
 */
export const AppInfo = {
  name: packageJson.name,
  displayName: packageJson.productName,
  version: packageJson.version,
  author: packageJson.author,
  description: packageJson.description,

  /**
   * 获取完整的窗口标题
   */
  getWindowTitle(): string {
    return `${this.displayName} - v${this.version} - ${this.author}`
  },

  /**
   * 获取应用信息对象
   */
  getAppInfo() {
    return {
      name: this.name,
      displayName: this.displayName,
      version: this.version,
      author: this.author,
      description: this.description
    }
  }
} as const
